package com.shazhu.nongjt.service.impl;

import java.util.List;
import com.shazhu.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.shazhu.nongjt.mapper.NjtPrinterAuthMapper;
import com.shazhu.nongjt.domain.NjtPrinterAuth;
import com.shazhu.nongjt.service.INjtPrinterAuthService;

/**
 * 打印机认证记录Service业务层处理
 * 
 * @author shazhu
 * @date 2025-09-29
 */
@Service
public class NjtPrinterAuthServiceImpl implements INjtPrinterAuthService 
{
    @Autowired
    private NjtPrinterAuthMapper njtPrinterAuthMapper;

    /**
     * 查询打印机认证记录
     * 
     * @param authId 打印机认证记录主键
     * @return 打印机认证记录
     */
    @Override
    public NjtPrinterAuth selectNjtPrinterAuthByAuthId(Long authId)
    {
        return njtPrinterAuthMapper.selectNjtPrinterAuthByAuthId(authId);
    }

    /**
     * 查询打印机认证记录列表
     * 
     * @param njtPrinterAuth 打印机认证记录
     * @return 打印机认证记录
     */
    @Override
    public List<NjtPrinterAuth> selectNjtPrinterAuthList(NjtPrinterAuth njtPrinterAuth)
    {
        return njtPrinterAuthMapper.selectNjtPrinterAuthList(njtPrinterAuth);
    }

    /**
     * 新增打印机认证记录
     * 
     * @param njtPrinterAuth 打印机认证记录
     * @return 结果
     */
    @Override
    public int insertNjtPrinterAuth(NjtPrinterAuth njtPrinterAuth)
    {
        njtPrinterAuth.setCreateTime(DateUtils.getNowDate());
        return njtPrinterAuthMapper.insertNjtPrinterAuth(njtPrinterAuth);
    }

    /**
     * 修改打印机认证记录
     * 
     * @param njtPrinterAuth 打印机认证记录
     * @return 结果
     */
    @Override
    public int updateNjtPrinterAuth(NjtPrinterAuth njtPrinterAuth)
    {
        njtPrinterAuth.setUpdateTime(DateUtils.getNowDate());
        return njtPrinterAuthMapper.updateNjtPrinterAuth(njtPrinterAuth);
    }

    /**
     * 批量删除打印机认证记录
     * 
     * @param authIds 需要删除的打印机认证记录主键
     * @return 结果
     */
    @Override
    public int deleteNjtPrinterAuthByAuthIds(Long[] authIds)
    {
        return njtPrinterAuthMapper.deleteNjtPrinterAuthByAuthIds(authIds);
    }

    /**
     * 删除打印机认证记录信息
     * 
     * @param authId 打印机认证记录主键
     * @return 结果
     */
    @Override
    public int deleteNjtPrinterAuthByAuthId(Long authId)
    {
        return njtPrinterAuthMapper.deleteNjtPrinterAuthByAuthId(authId);
    }
}
